home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-20
/
rs0422.zip
/
LEVEL1
/
LEVEL12.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-11-13
|
6KB
|
167 lines
/*
* Copyright 1988 by the Radio Amateur Telecommunications Society
* and Thomas A. Moulton, W2VY
*
* This software may only be modified, copied, distributed or
* executed for non-profit purposes by individuals operating
* systems in the Amateur Radio Service. Credit to the
* author(s) and to the Radio Amateur Telecommunications Society
* must be made in modules where RATS provided software is used,
* and in any announcements and documentation.
*
* As a non-profit, research and development organization, the
* Radio Amateur Telecommunications Society distributes software
* in both executable and source forms. This policy is in place
* to encourage the development and distribution of OSI-based,
* networking tools. In order to protect the interests of the
* Society and the authors, we have placed some conditions
* of use on the software. Other groups are encouraged
* to place the same or similar guidelines on
* software they produce.
*
* The Radio Amateur Telecommunications Society reserves the right
* to specify and alter the terms under which software provided by
* the Society may be used. This policy is consistent with the
* objective of uniform and consistent "Open Systems Interconnections."
*
* All acceptable Amateur Radio related uses of this software
* will be outlined in the "ROSE Implementer's Guide". Individuals
* or organizations wishing to add to, or modify the provisions of
* the guide to accommodate local or evolutionary requirements
* should document the proposed change(s) and forward them to the
* Society. If accepted, written notification will be provided by
* the Society to the submitting organization or individual(s).
* The Society will then issue a "ROSE Implementer's Guide Change
* Notice". Periodically, the Society will re-issue the "ROSE
* Implementer's Guide" and incorporate the text of the change
* notices. This procedure has been put in to place to ensure
* compatibility between systems and to ensure their "Openness"
* and interoperability.
*
* No part of this software may be used in other packages
* without prior authorization from the author or the Society.
* Software incorporating this module, all or in part, must be
* provided to the Society prior to distribution or use by
* anyone not directly involved in testing of the revised
* environment. Current releases of the combined software must
* be provided to the Society in both source and executable
* forms. Adequate documention to produce an executable module
* from the provided source must also be included.
*
* Non-Amateur Radio non-profit uses may be authorized on a case
* by case basis. Inquiries for such use may be made in writing
* to the Society. Non-commercial uses consistent with the
* general principles of Open Systems Interconnection Reference
* Model will be generally considered with favor.
*
* Commercial licensing of the software is also available based
* on normal commercial terms. Licensing inquiries should be
* directed to the Society. Commercial licensing of the standard
* software will be done in situations which materially benefit
* the Amateur Radio Packet Network. Additional licensing is
* reserved by the individual authors.
*
* The Radio Amateur Telecommunications Society provides this software
* on an "as is" basis. The Society assumes no liability for
* loss incurred through the use of this software. Amateur Radio
* use of this software implies non-commercial and voluntary
* development, deployment and use of this software in a "Amateur",
* non-commercial service. Commercial users are encouraged to
* inspect their copies of the source code. Source code modification
* licenses are available if a combined Object and Source Code
* license was not originally established.
*
* The Society may be contacted by writing or calling at:
*
* The Radio Amateur Telecommunications Society
* 206 North Vivyen Street.
* Bergenfield, New Jersey 07621
*
* Telephone: 201-387-8896
*
*/
/* This file contains the C routines used to interoperate between the
Level 1 ISR's and Level 2 in Task state */
#include "iface.h"
#include "buffer.h"
#include "ax25.h"
#include "ax25l2.h"
#if 0
struct ax25_addr CONFIG = {
{0x86, 0x9e, 0x9c, 0x8c, 0x92, 0x8e}, {0x00}
};
#endif
struct ax25_parms dl2parms={
V2, /* AX25L2 Version 2, default */
5, /* T1, frack */
4, /* T2, resptime */
300, /* T3, check (5 mins.) */
8, /* N2, retry */
4, /* W, maxframe */
256 /* N1, framesize */
};
struct ax25_parms dl3parms={
V2, /* AX25L2 Version 2, default */
5, /* T1, frack */
4, /* T2, resptime */
600, /* T3, check (10 mins.) */
8, /* N2, retry */
3, /* W, maxframe */
256 /* N1, framesize */
};
#if 0
void
free_packet(pkt)
struct datastr *pkt;
{
free_pkt(pkt);
}
int
echo(ifx, pkt)
register struct interface *ifx;
struct datastr *pkt;
{
struct datastr *mkpkt();
SIO_SND(ifx->dev,mkpkt("Rx Echo"));
return siosnd(ifx, pkt);
}
puthexs(str1,val1,str2,val2)
char *str1, *str2;
unsigned int val1, val2;
{
register struct datastr *p;
struct datastr *puthex();
p=puthex(str1,val1);
p->nexts=puthex(str2,val2);
bappch(p->nexts,0x0d);
bappch(p->nexts,0x0a);
SIO_SND(1,p);
}
struct datastr *
puthex(str,val)
char *str;
unsigned int val;
{
register struct datastr *p;
struct datastr *mkpkt();
p=mkpkt(str);
bappch(p,0x20);
putxint(p,val);
bappch(p,0x20);
return p;
}
#endif